package com.cinc.ebc.sd.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinc.ebc.sd.model.*;
import com.cinc.ebc.sd.vo.SdRptSalesOrderStatPage;
import com.cinc.ebc.sd.vo.SdSalesOrderDetailPage;
import org.apache.ibatis.annotations.Param;
import com.cinc.ebc.sd.entity.SdSalesOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 销售订单
 * @Author: jeecg-boot
 * @Date:   2022-09-25
 * @Version: V1.0
 */
public interface SdSalesOrderMapper extends BaseMapper<SdSalesOrder> {

    List<String> selectIdListByOrderNoJoin(@Param("orderNoJoin") String orderNoJoin);

    int autoUpdateStatus(@Param("id") String id);

    List<SdRptSalesOrderMaterialStatModel> selectRptMaterialStatList(Page<SdRptSalesOrderMaterialStatModel> page, @Param("paramModel")SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

    SdRptSalesOrderMaterialStatTotalModel selectRptMaterialStatTotal(@Param("paramModel")SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

    List<SdRptSalesOrderCustomerStatModel> selectRptCustomerStatList(Page<SdRptSalesOrderCustomerStatModel> page, @Param("paramModel")SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

    SdRptSalesOrderCustomerStatTotalModel selectRptCustomerStatTotal(@Param("paramModel")SdRptSalesOrderStatPage sdRptSalesOrderStatPage);

    List<SdSalesOrderCustomerMaterialModel> selectCustomerMaterialStatList(Page<SdSalesOrderCustomerMaterialModel> page,
                                                                           @Param("detail") SdSalesOrderDetailPage detailPage,
                                                                           @Param("permissionSql") String permissionSql);
}
